const seq = require('sequelize')
const time = require('../time');
module.exports = {
  NAME: 'sys_dict_data',
  TABLE: {
    dict_code: {
      type: seq.INTEGER(20),
      primaryKey: true,
      unique: true,
      autoIncrement: true,
      allowNull: false,
      comment: 'dict_code 字典编码',
      field: 'dict_code', //  相应的字段名称
    },
    dict_sort:{
      type: seq.INTEGER(4),
      allowNull: false,
      comment: '字典排序',
      field: 'dict_sort', //  相应的字段名称
      defaultValue: 0
    },
    dict_label: {
      type: seq.STRING(100),
      comment: '字典标签',
      field: 'dict_label',
      defaultValue: ''
    },
    dict_value: {
      type: seq.STRING(100),
      comment: '字典键值',
      field: 'dict_value',
      defaultValue: ''
    },
    dict_type:{
      type: seq.STRING(100),
      comment: '字典类型',
      field: 'dict_type',
      defaultValue: ''
    },
    css_class:{
      type: seq.STRING(100),
      comment: '样式属性（其他样式扩展）',
      field: 'css_class',
      defaultValue: null
    },
    list_class:{
      type: seq.STRING(100),
      comment: '表格回显样式',
      field: 'list_class',
      defaultValue: null
    },
    is_default:{
      type: seq.CHAR(1),
      comment: '是否默认（Y是 N否）',
      field: 'is_default',
      defaultValue: 'N'
    },
    status: {
      type: seq.CHAR(1),
      comment: '状态（1正常 0停用）',
      field: 'status',
      defaultValue: '1'
    },
    del_flag:{
      type: seq.CHAR(1),
      comment: '删除标志（0代表存在 2代表删除）',
      field: 'del_flag',
      defaultValue: '0'
    },
    remark: {
      type: seq.STRING(500),
      comment: '备注',
      field: 'remark',
      defaultValue: ''
    },
    ...time.create_date,
    ...time.update_date,
    ...time.create_by,
    ...time.update_by,
  },
}
